/**
 * This file is part of ossecdb-extjs.
 *
 * Copyright (C) 2011 Brendan Johnston
 *
 * Contact: brendan@johnston.net.au
 *
 * Project: http://code.google.com/p/ossecdb-extjs/
 *
 * License: http://www.gnu.org/licenses/gpl-3.0.html
 */

Ext.Loader.setConfig({enabled:true});

Ext.Loader.setPath('Ext.ux', OssecWebConfig.paths.extjs + '/examples/ux');

Ext.require([
	'Ext.data.*',
	'Ext.grid.*',
	'Ext.tree.*',
	'Ext.state.*',
	'Ext.toolbar.Paging',
	'Ext.ux.grid.FiltersFeature'
]);

Ext.onReady(function(){

	Ext.state.Manager.setProvider(
		Ext.create('Ext.state.CookieProvider', {
			expires: new Date(new Date().getTime()+(1000*60*60*24*30)),
			listeners: {
				
				//statechange: function (provider, key, value, options) {
				//	alert(key + ' = ' + Ext.JSON.encode(value));
				//}
				
			}
		})
	);

});

Ext.application({
	
	name: 'OssecWeb',
	
	appFolder: 'app',

	controllers: ['Main'],

    autoCreateViewport: true,
	
	launch: function () {}
});